Imports System.Text.RegularExpressions
Class RegExReplace
    Public ReadOnly pattern As String
    Public ReadOnly replacement As String
    Public Sub New(ByVal pattern As String, ByVal replacement As String)
        Me.pattern = pattern
        Me.replacement = replacement
    End Sub
    Public Function Process(ByRef input As String) As String
        Return Regex.Replace(input, pattern, replacement)
    End Function
    Public Function IsMatch(ByRef input As String) As Boolean
        Return Regex.IsMatch(input, pattern)
    End Function
End Class